<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.12.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>MDF Lib: include/mdf/mdfwriter.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script type="text/javascript" src="clipboard.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="cookie.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="utillib.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">MDF Lib<span id="projectnumber">&#160;2.2</span>
   </div>
   <div id="projectbrief">Interface against MDF 3/4 files</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.12.0 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() { codefold.init(0); });
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search',false);
  $(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function(){ initResizable(false); });
/* @license-end */
</script>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_dea88a92c3ac1d8c329848683c200b71.html">mdf</a></li>  </ul>
</div>
</div><!-- top -->
<div id="doc-content">
<div class="header">
  <div class="headertitle"><div class="title">mdfwriter.h</div></div>
</div><!--header-->
<div class="contents">
<a href="mdfwriter_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno">    1</span><span class="comment">/*</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno">    2</span><span class="comment"> * Copyright 2022 Ingemar Hedvall</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno">    3</span><span class="comment"> * SPDX-License-Identifier: MIT</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno">    4</span><span class="comment"> */</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno">    5</span> </div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno">    6</span><span class="preprocessor">#pragma once</span></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno">    7</span><span class="preprocessor">#include &lt;atomic&gt;</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno">    8</span><span class="preprocessor">#include &lt;condition_variable&gt;</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno">    9</span><span class="preprocessor">#include &lt;deque&gt;</span></div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno">   10</span><span class="preprocessor">#include &lt;mutex&gt;</span></div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno">   11</span><span class="preprocessor">#include &lt;string&gt;</span></div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno">   12</span><span class="preprocessor">#include &lt;thread&gt;</span></div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno">   13</span><span class="preprocessor">#include &lt;map&gt;</span></div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno">   14</span> </div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno">   15</span><span class="preprocessor">#include &quot;<a class="code" href="mdffile_8h.html">mdf/mdffile.h</a>&quot;</span></div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno">   16</span><span class="preprocessor">#include &quot;<a class="code" href="samplerecord_8h.html">mdf/samplerecord.h</a>&quot;</span></div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno">   17</span><span class="preprocessor">#include &quot;<a class="code" href="canmessage_8h.html">mdf/canmessage.h</a>&quot;</span></div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno">   18</span> </div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno">   22</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespacemdf.html">mdf</a> {</div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno">   23</span> </div>
<div class="foldopen" id="foldopen00029" data-start="{" data-end="};">
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"><a class="line" href="namespacemdf.html#ab408474aca4bb3e6fb04416ec3044d40">   29</a></span><span class="keyword">enum class</span> <a class="code hl_enumeration" href="namespacemdf.html#ab408474aca4bb3e6fb04416ec3044d40">MdfBusType</a> : <span class="keywordtype">int</span> {</div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno">   30</span>  <a class="code hl_enumvalue" href="namespacemdf.html#ab408474aca4bb3e6fb04416ec3044d40a6d5050f7a97e7e2e881a4e09dfbd6087">CAN</a>,      </div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno">   31</span>  <a class="code hl_enumvalue" href="namespacemdf.html#ab408474aca4bb3e6fb04416ec3044d40a90c3fd5ee0c6c471cac39b5f9a4ffae2">LIN</a>,      </div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno">   32</span>  <a class="code hl_enumvalue" href="namespacemdf.html#a7d8062669e05a387de168820f98d4ff6a01ae658e39b5a3a94590c6d88cffe050">FlexRay</a>,  </div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno">   33</span>  <a class="code hl_enumvalue" href="namespacemdf.html#ab408474aca4bb3e6fb04416ec3044d40a882dd232c0425bb9366544f84f0a7b6c">MOST</a>,     </div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno">   34</span>  <a class="code hl_enumvalue" href="namespacemdf.html#a7d8062669e05a387de168820f98d4ff6abe2ae05fb04ddcf6efa31e63e0f0e111">Ethernet</a>, </div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno">   35</span>  <a class="code hl_enumvalue" href="namespacemdf.html#ab408474aca4bb3e6fb04416ec3044d40a696b031073e74bf2cb98e5ef201d4aa3">UNKNOWN</a>   </div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno">   36</span>};</div>
</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno">   37</span> </div>
<div class="foldopen" id="foldopen00053" data-start="{" data-end="};">
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"><a class="line" href="namespacemdf.html#a7e87e4f5b259d4a96040c3729bc2d75c">   53</a></span><span class="keyword">enum class</span> <a class="code hl_enumeration" href="namespacemdf.html#a7e87e4f5b259d4a96040c3729bc2d75c">MdfStorageType</a> : <span class="keywordtype">int</span> {</div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno">   54</span>  <a class="code hl_enumvalue" href="namespacemdf.html#a7e87e4f5b259d4a96040c3729bc2d75ca3ddf6d91674409a2af938290dca6f94c">FixedLengthStorage</a>, </div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno">   55</span>  <a class="code hl_enumvalue" href="namespacemdf.html#a7e87e4f5b259d4a96040c3729bc2d75ca147ee54090dbf77df17c23f9202ad0c3">VlsdStorage</a>,        </div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno">   56</span>  <a class="code hl_enumvalue" href="namespacemdf.html#a7e87e4f5b259d4a96040c3729bc2d75ca8492a9813f972dc0ac344d500f1268f5">MlsdStorage</a>,        </div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno">   57</span>};</div>
</div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno">   58</span> </div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno">   59</span><span class="keyword">class </span>IChannelGroup;</div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno">   60</span><span class="keyword">class </span>IChannel;</div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno">   61</span><span class="keyword">class </span>IChannelConversion;</div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno">   62</span><span class="keyword">class </span>IDataGroup;</div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno">   63</span> </div>
<div class="foldopen" id="foldopen00104" data-start="{" data-end="};">
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"><a class="line" href="classmdf_1_1_mdf_writer.html">  104</a></span><span class="keyword">class </span><a class="code hl_class" href="classmdf_1_1_mdf_writer.html">MdfWriter</a> {</div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno">  105</span> <span class="keyword">public</span>:</div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"><a class="line" href="classmdf_1_1_mdf_writer.html#ac5cc8e6a096cdb641a7a36efbc2793af">  106</a></span>  <a class="code hl_function" href="classmdf_1_1_mdf_writer.html#ac5cc8e6a096cdb641a7a36efbc2793af">MdfWriter</a>() = <span class="keywordflow">default</span>; </div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"><a class="line" href="classmdf_1_1_mdf_writer.html#ab23f3e5d955e7d86632ff6333cb73871">  107</a></span>  <span class="keyword">virtual</span> <a class="code hl_function" href="classmdf_1_1_mdf_writer.html#ab23f3e5d955e7d86632ff6333cb73871">~MdfWriter</a>();  </div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno">  108</span> </div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno">  109</span>  <a class="code hl_function" href="classmdf_1_1_mdf_writer.html#ac5cc8e6a096cdb641a7a36efbc2793af">MdfWriter</a>(<span class="keyword">const</span> <a class="code hl_class" href="classmdf_1_1_mdf_writer.html">MdfWriter</a>&amp; writer) = <span class="keyword">delete</span>;</div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno">  110</span>  <a class="code hl_class" href="classmdf_1_1_mdf_writer.html">MdfWriter</a>&amp; operator=(<span class="keyword">const</span> <a class="code hl_class" href="classmdf_1_1_mdf_writer.html">MdfWriter</a>&amp; writer) = <span class="keyword">delete</span>;</div>
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno">  111</span> </div>
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"><a class="line" href="classmdf_1_1_mdf_writer.html#afcf1395a8dffe0b70b9e9be0e9731498">  113</a></span>  [[nodiscard]] std::string <a class="code hl_function" href="classmdf_1_1_mdf_writer.html#afcf1395a8dffe0b70b9e9be0e9731498">Name</a>() <span class="keyword">const</span>;</div>
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno">  114</span> </div>
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"><a class="line" href="classmdf_1_1_mdf_writer.html#a77e457f8f1b7d048a7b575b94a4f3b2f">  122</a></span>  <span class="keywordtype">bool</span> <a class="code hl_function" href="classmdf_1_1_mdf_writer.html#a77e457f8f1b7d048a7b575b94a4f3b2f">Init</a>(<span class="keyword">const</span> std::string&amp; filename);</div>
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno">  123</span> </div>
<div class="foldopen" id="foldopen00125" data-start="{" data-end="}">
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"><a class="line" href="classmdf_1_1_mdf_writer.html#ae6896328957c4cba89dbde77669207cb">  125</a></span>  [[nodiscard]] <span class="keywordtype">bool</span> <a class="code hl_function" href="classmdf_1_1_mdf_writer.html#ae6896328957c4cba89dbde77669207cb">IsFileNew</a>()<span class="keyword"> const </span>{</div>
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno">  126</span>    <span class="keywordflow">return</span> <a class="code hl_variable" href="classmdf_1_1_mdf_writer.html#ab826f4056726222307602355e4949c79">write_state_</a> == <a class="code hl_enumvalue" href="classmdf_1_1_mdf_writer.html#adadc2746aad9d59686ca5a984404c69fa686e697538050e4664636337cc3b834f">WriteState::Create</a>;</div>
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno">  127</span>  }</div>
</div>
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno">  128</span> </div>
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"><a class="line" href="classmdf_1_1_mdf_writer.html#a6b6d60272eedb8817c7a480620ec5e02">  135</a></span>  <span class="keywordtype">void</span> <a class="code hl_function" href="classmdf_1_1_mdf_writer.html#a6b6d60272eedb8817c7a480620ec5e02">PreTrigTime</a>(<span class="keywordtype">double</span> pre_trig_time);</div>
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"><a class="line" href="classmdf_1_1_mdf_writer.html#a2a4afa5ae8c5e296a9c86c1e9e35f9af">  136</a></span>  [[nodiscard]] <span class="keywordtype">double</span> <a class="code hl_function" href="classmdf_1_1_mdf_writer.html#a2a4afa5ae8c5e296a9c86c1e9e35f9af">PreTrigTime</a>() <span class="keyword">const</span>; </div>
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno">  137</span> </div>
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"><a class="line" href="classmdf_1_1_mdf_writer.html#aa4863f697ceb1809e37952b59ffd1d5d">  139</a></span>  [[nodiscard]] uint64_t <a class="code hl_function" href="classmdf_1_1_mdf_writer.html#aa4863f697ceb1809e37952b59ffd1d5d">StartTime</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code hl_variable" href="classmdf_1_1_mdf_writer.html#acb39fac997fbfe3224aa2796e444f96e">start_time_</a>; }</div>
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno"><a class="line" href="classmdf_1_1_mdf_writer.html#aef88554f1428a4b31233e1bcc88cf2d4">  141</a></span>  [[nodiscard]] uint64_t <a class="code hl_function" href="classmdf_1_1_mdf_writer.html#aef88554f1428a4b31233e1bcc88cf2d4">StopTime</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code hl_variable" href="classmdf_1_1_mdf_writer.html#a9392b77baecf6dc01410113c7d1124fd">stop_time_</a>; }</div>
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno">  142</span> </div>
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno"><a class="line" href="classmdf_1_1_mdf_writer.html#a43e622ce5737cf5115aadc32536c4018">  150</a></span>  <a class="code hl_class" href="classmdf_1_1_mdf_file.html">MdfFile</a>* <a class="code hl_function" href="classmdf_1_1_mdf_writer.html#a43e622ce5737cf5115aadc32536c4018">GetFile</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code hl_variable" href="classmdf_1_1_mdf_writer.html#a2b75266333ae91f1091d5860e718797f">mdf_file_</a>.get(); }</div>
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno">  151</span> </div>
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno"><a class="line" href="classmdf_1_1_mdf_writer.html#aae1d91dced5a573d6862fc1db77c0468">  152</a></span>  [[nodiscard]] <a class="code hl_class" href="classmdf_1_1_i_header.html">IHeader</a>* <a class="code hl_function" href="classmdf_1_1_mdf_writer.html#aae1d91dced5a573d6862fc1db77c0468">Header</a>() <span class="keyword">const</span>; </div>
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno">  153</span> </div>
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno"><a class="line" href="classmdf_1_1_mdf_writer.html#a515e3740c9f9314e1bcc69a420813652">  160</a></span>  <span class="keywordtype">bool</span> <a class="code hl_function" href="classmdf_1_1_mdf_writer.html#a515e3740c9f9314e1bcc69a420813652">CreateBusLogConfiguration</a>();</div>
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno">  161</span>  </div>
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno"><a class="line" href="classmdf_1_1_mdf_writer.html#a26311c47fba7773402efc64c969de767">  163</a></span>  [[nodiscard]] <a class="code hl_class" href="classmdf_1_1_i_data_group.html">IDataGroup</a>* <a class="code hl_function" href="classmdf_1_1_mdf_writer.html#a26311c47fba7773402efc64c969de767">CreateDataGroup</a>();</div>
<div class="line"><a id="l00165" name="l00165"></a><span class="lineno"><a class="line" href="classmdf_1_1_mdf_writer.html#a62ed99c7938eea491b4ab7e30fa2a9f8">  165</a></span>  [[nodiscard]] <span class="keyword">static</span> <a class="code hl_class" href="classmdf_1_1_i_channel_group.html">IChannelGroup</a>* <a class="code hl_function" href="classmdf_1_1_mdf_writer.html#a62ed99c7938eea491b4ab7e30fa2a9f8">CreateChannelGroup</a>(<a class="code hl_class" href="classmdf_1_1_i_data_group.html">IDataGroup</a>* parent);</div>
<div class="line"><a id="l00167" name="l00167"></a><span class="lineno"><a class="line" href="classmdf_1_1_mdf_writer.html#a00cfdd411a43942ac094fe2cbfbfba14">  167</a></span>  [[nodiscard]] <span class="keyword">static</span> <a class="code hl_class" href="classmdf_1_1_i_channel.html">IChannel</a>* <a class="code hl_function" href="classmdf_1_1_mdf_writer.html#a00cfdd411a43942ac094fe2cbfbfba14">CreateChannel</a>(<a class="code hl_class" href="classmdf_1_1_i_channel_group.html">IChannelGroup</a>* parent);</div>
<div class="line"><a id="l00169" name="l00169"></a><span class="lineno"><a class="line" href="classmdf_1_1_mdf_writer.html#a8809959955cbbadc95c0d2a1789eb784">  169</a></span>  <span class="keyword">virtual</span> <a class="code hl_class" href="classmdf_1_1_i_channel_conversion.html">IChannelConversion</a>* <a class="code hl_function" href="classmdf_1_1_mdf_writer.html#a8809959955cbbadc95c0d2a1789eb784">CreateChannelConversion</a>(<a class="code hl_class" href="classmdf_1_1_i_channel.html">IChannel</a>* parent) = 0;</div>
<div class="line"><a id="l00170" name="l00170"></a><span class="lineno">  170</span> </div>
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno"><a class="line" href="classmdf_1_1_mdf_writer.html#a99e1aa5229ebbee9ee533e6a9d12445c">  174</a></span>  <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="classmdf_1_1_mdf_writer.html#a99e1aa5229ebbee9ee533e6a9d12445c">InitMeasurement</a>();</div>
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno">  175</span> </div>
<div class="line"><a id="l00188" name="l00188"></a><span class="lineno"><a class="line" href="classmdf_1_1_mdf_writer.html#a8ae87053a772a46a7ad599f14c2c0521">  188</a></span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classmdf_1_1_mdf_writer.html#a8ae87053a772a46a7ad599f14c2c0521">SaveSample</a>(<span class="keyword">const</span> <a class="code hl_class" href="classmdf_1_1_i_channel_group.html">IChannelGroup</a>&amp; group, uint64_t time);</div>
<div class="line"><a id="l00189" name="l00189"></a><span class="lineno">  189</span> </div>
<div class="line"><a id="l00202" name="l00202"></a><span class="lineno"><a class="line" href="classmdf_1_1_mdf_writer.html#a3e1c278164191a0f0c21bcb650153aa3">  202</a></span>  <span class="keywordtype">void</span> <a class="code hl_function" href="classmdf_1_1_mdf_writer.html#a3e1c278164191a0f0c21bcb650153aa3">SaveCanMessage</a>(<span class="keyword">const</span> <a class="code hl_class" href="classmdf_1_1_i_channel_group.html">IChannelGroup</a>&amp; group, uint64_t time,</div>
<div class="line"><a id="l00203" name="l00203"></a><span class="lineno">  203</span>                      <span class="keyword">const</span> <a class="code hl_class" href="classmdf_1_1_can_message.html">CanMessage</a>&amp; msg);</div>
<div class="line"><a id="l00204" name="l00204"></a><span class="lineno">  204</span> </div>
<div class="line"><a id="l00206" name="l00206"></a><span class="lineno"><a class="line" href="classmdf_1_1_mdf_writer.html#a3d8644bac04ec6f8189a216967fd3705">  206</a></span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classmdf_1_1_mdf_writer.html#a3d8644bac04ec6f8189a216967fd3705">StartMeasurement</a>(uint64_t start_time);</div>
<div class="line"><a id="l00207" name="l00207"></a><span class="lineno">  207</span>  </div>
<div class="line"><a id="l00209" name="l00209"></a><span class="lineno"><a class="line" href="classmdf_1_1_mdf_writer.html#a2c990a789c1c8ac3c9de57a5a7904aa4">  209</a></span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classmdf_1_1_mdf_writer.html#a2c990a789c1c8ac3c9de57a5a7904aa4">StartMeasurement</a>(<a class="code hl_class" href="classmdf_1_1_i_timestamp.html">ITimestamp</a> &amp;start_time);</div>
<div class="line"><a id="l00211" name="l00211"></a><span class="lineno"><a class="line" href="classmdf_1_1_mdf_writer.html#ae2a8836a711bae7b437f1e5aeb6424e7">  211</a></span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classmdf_1_1_mdf_writer.html#ae2a8836a711bae7b437f1e5aeb6424e7">StopMeasurement</a>(uint64_t stop_time);</div>
<div class="line"><a id="l00213" name="l00213"></a><span class="lineno"><a class="line" href="classmdf_1_1_mdf_writer.html#a3efa37375f9f6ce516ca1ed00dc987e9">  213</a></span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classmdf_1_1_mdf_writer.html#a3efa37375f9f6ce516ca1ed00dc987e9">StopMeasurement</a>(<a class="code hl_class" href="classmdf_1_1_i_timestamp.html">ITimestamp</a> &amp;start_time);</div>
<div class="line"><a id="l00214" name="l00214"></a><span class="lineno">  214</span>  </div>
<div class="line"><a id="l00217" name="l00217"></a><span class="lineno"><a class="line" href="classmdf_1_1_mdf_writer.html#a225dba7a33abbf4097c79de1a01e7c48">  217</a></span>  <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="classmdf_1_1_mdf_writer.html#a225dba7a33abbf4097c79de1a01e7c48">FinalizeMeasurement</a>();</div>
<div class="line"><a id="l00218" name="l00218"></a><span class="lineno">  218</span> </div>
<div class="line"><a id="l00227" name="l00227"></a><span class="lineno"><a class="line" href="classmdf_1_1_mdf_writer.html#a0a15689cb48b10b4dc33cf4f145a9a8f">  227</a></span>  <span class="keywordtype">void</span> <a class="code hl_function" href="classmdf_1_1_mdf_writer.html#a0a15689cb48b10b4dc33cf4f145a9a8f">BusType</a>(<a class="code hl_enumeration" href="namespacemdf.html#ab408474aca4bb3e6fb04416ec3044d40">MdfBusType</a> type) { bus_type_ = type; }</div>
<div class="line"><a id="l00228" name="l00228"></a><span class="lineno">  228</span> </div>
<div class="line"><a id="l00233" name="l00233"></a><span class="lineno"><a class="line" href="classmdf_1_1_mdf_writer.html#a8347d854796a708b17e3ed585de12d63">  233</a></span>  [[nodiscard]] <a class="code hl_enumeration" href="namespacemdf.html#ab408474aca4bb3e6fb04416ec3044d40">MdfBusType</a> <a class="code hl_function" href="classmdf_1_1_mdf_writer.html#a8347d854796a708b17e3ed585de12d63">BusType</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> bus_type_; }</div>
<div class="line"><a id="l00234" name="l00234"></a><span class="lineno">  234</span> </div>
<div class="line"><a id="l00236" name="l00236"></a><span class="lineno"><a class="line" href="classmdf_1_1_mdf_writer.html#aa1db4cc3f1c198bf4bb21787a2977da2">  236</a></span>  [[nodiscard]] std::string_view <a class="code hl_function" href="classmdf_1_1_mdf_writer.html#aa1db4cc3f1c198bf4bb21787a2977da2">BusTypeAsString</a>() <span class="keyword">const</span>;</div>
<div class="line"><a id="l00237" name="l00237"></a><span class="lineno">  237</span> </div>
<div class="line"><a id="l00256" name="l00256"></a><span class="lineno"><a class="line" href="classmdf_1_1_mdf_writer.html#a5cba5efbf74443c0831289f616e1e174">  256</a></span>  <span class="keywordtype">void</span> <a class="code hl_function" href="classmdf_1_1_mdf_writer.html#a5cba5efbf74443c0831289f616e1e174">StorageType</a>(<a class="code hl_enumeration" href="namespacemdf.html#a7e87e4f5b259d4a96040c3729bc2d75c">MdfStorageType</a> type) { storage_type_ = type; }</div>
<div class="line"><a id="l00257" name="l00257"></a><span class="lineno">  257</span> </div>
<div class="line"><a id="l00262" name="l00262"></a><span class="lineno"><a class="line" href="classmdf_1_1_mdf_writer.html#a0674674943a903ffff27c91fdfbc6c87">  262</a></span>  [[nodiscard]] <a class="code hl_enumeration" href="namespacemdf.html#a7e87e4f5b259d4a96040c3729bc2d75c">MdfStorageType</a> <a class="code hl_function" href="classmdf_1_1_mdf_writer.html#a0674674943a903ffff27c91fdfbc6c87">StorageType</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> storage_type_; }</div>
<div class="line"><a id="l00263" name="l00263"></a><span class="lineno">  263</span> </div>
<div class="line"><a id="l00272" name="l00272"></a><span class="lineno"><a class="line" href="classmdf_1_1_mdf_writer.html#ae49cb5ee7246cbd5e8ef7074c74baf62">  272</a></span>  <span class="keywordtype">void</span> <a class="code hl_function" href="classmdf_1_1_mdf_writer.html#ae49cb5ee7246cbd5e8ef7074c74baf62">MaxLength</a>(uint32_t max_length) {max_length_ = max_length;};</div>
<div class="line"><a id="l00273" name="l00273"></a><span class="lineno">  273</span> </div>
<div class="line"><a id="l00275" name="l00275"></a><span class="lineno"><a class="line" href="classmdf_1_1_mdf_writer.html#ae6a7507cdd19b31939f438fcd432583a">  275</a></span>  [[nodiscard]] uint32_t <a class="code hl_function" href="classmdf_1_1_mdf_writer.html#ae6a7507cdd19b31939f438fcd432583a">MaxLength</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> max_length_; }</div>
<div class="line"><a id="l00276" name="l00276"></a><span class="lineno">  276</span> </div>
<div class="line"><a id="l00278" name="l00278"></a><span class="lineno"><a class="line" href="classmdf_1_1_mdf_writer.html#a89012f9568a274e1d66fb444452256aa">  278</a></span>  <span class="keywordtype">void</span> <a class="code hl_function" href="classmdf_1_1_mdf_writer.html#a89012f9568a274e1d66fb444452256aa">CompressData</a>(<span class="keywordtype">bool</span> compress) {compress_data_ = compress;}</div>
<div class="line"><a id="l00280" name="l00280"></a><span class="lineno"><a class="line" href="classmdf_1_1_mdf_writer.html#a1baf7d66ae7faa71c437a3a7274545ee">  280</a></span>  [[nodiscard]] <span class="keywordtype">bool</span> <a class="code hl_function" href="classmdf_1_1_mdf_writer.html#a1baf7d66ae7faa71c437a3a7274545ee">CompressData</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> compress_data_;}</div>
<div class="line"><a id="l00281" name="l00281"></a><span class="lineno">  281</span> </div>
<div class="line"><a id="l00282" name="l00282"></a><span class="lineno">  282</span> <span class="keyword">protected</span>:</div>
<div class="foldopen" id="foldopen00284" data-start="{" data-end="};">
<div class="line"><a id="l00284" name="l00284"></a><span class="lineno"><a class="line" href="classmdf_1_1_mdf_writer.html#adadc2746aad9d59686ca5a984404c69f">  284</a></span>  <span class="keyword">enum class</span> <a class="code hl_enumeration" href="classmdf_1_1_mdf_writer.html#adadc2746aad9d59686ca5a984404c69f">WriteState</a> : uint8_t {</div>
<div class="line"><a id="l00285" name="l00285"></a><span class="lineno">  285</span>    <a class="code hl_enumvalue" href="classmdf_1_1_mdf_writer.html#adadc2746aad9d59686ca5a984404c69fa686e697538050e4664636337cc3b834f">Create</a>,     </div>
<div class="line"><a id="l00286" name="l00286"></a><span class="lineno">  286</span>    <a class="code hl_enumvalue" href="classmdf_1_1_mdf_writer.html#adadc2746aad9d59686ca5a984404c69fa95b19f7739b0b7ea7d6b07586be54f36">Init</a>,       </div>
<div class="line"><a id="l00287" name="l00287"></a><span class="lineno">  287</span>    <a class="code hl_enumvalue" href="classmdf_1_1_mdf_writer.html#adadc2746aad9d59686ca5a984404c69fa5f686f3e8ee5b33ba455d12ddd5bbb0b">StartMeas</a>,  </div>
<div class="line"><a id="l00288" name="l00288"></a><span class="lineno">  288</span>    <a class="code hl_enumvalue" href="classmdf_1_1_mdf_writer.html#adadc2746aad9d59686ca5a984404c69fa4f243ebd916a3b0988217b1173b49816">StopMeas</a>,   </div>
<div class="line"><a id="l00289" name="l00289"></a><span class="lineno">  289</span>    <a class="code hl_enumvalue" href="classmdf_1_1_mdf_writer.html#adadc2746aad9d59686ca5a984404c69fafd565de81da1c94807c0b80840ba18b0">Finalize</a>    </div>
<div class="line"><a id="l00290" name="l00290"></a><span class="lineno">  290</span>  };</div>
</div>
<div class="line"><a id="l00291" name="l00291"></a><span class="lineno"><a class="line" href="classmdf_1_1_mdf_writer.html#ab826f4056726222307602355e4949c79">  291</a></span>  std::atomic&lt;WriteState&gt; <a class="code hl_variable" href="classmdf_1_1_mdf_writer.html#ab826f4056726222307602355e4949c79">write_state_</a> =</div>
<div class="line"><a id="l00292" name="l00292"></a><span class="lineno">  292</span>      <a class="code hl_enumvalue" href="classmdf_1_1_mdf_writer.html#adadc2746aad9d59686ca5a984404c69fa686e697538050e4664636337cc3b834f">WriteState::Create</a>;  </div>
<div class="line"><a id="l00293" name="l00293"></a><span class="lineno">  293</span> </div>
<div class="line"><a id="l00294" name="l00294"></a><span class="lineno"><a class="line" href="classmdf_1_1_mdf_writer.html#a2b75266333ae91f1091d5860e718797f">  294</a></span>  std::unique_ptr&lt;MdfFile&gt; <a class="code hl_variable" href="classmdf_1_1_mdf_writer.html#a2b75266333ae91f1091d5860e718797f">mdf_file_</a>;  </div>
<div class="line"><a id="l00295" name="l00295"></a><span class="lineno"><a class="line" href="classmdf_1_1_mdf_writer.html#a862e5393e4d212b9ff96c1acbf3b1270">  295</a></span>  std::string <a class="code hl_variable" href="classmdf_1_1_mdf_writer.html#a862e5393e4d212b9ff96c1acbf3b1270">filename_</a>;  </div>
<div class="line"><a id="l00296" name="l00296"></a><span class="lineno">  296</span> </div>
<div class="line"><a id="l00297" name="l00297"></a><span class="lineno"><a class="line" href="classmdf_1_1_mdf_writer.html#a0bdf7185c7edb044c1d8ee2a315e1c86">  297</a></span>  std::atomic&lt;uint64_t&gt; <a class="code hl_variable" href="classmdf_1_1_mdf_writer.html#a0bdf7185c7edb044c1d8ee2a315e1c86">pre_trig_time_</a> = 0;  </div>
<div class="line"><a id="l00298" name="l00298"></a><span class="lineno"><a class="line" href="classmdf_1_1_mdf_writer.html#acb39fac997fbfe3224aa2796e444f96e">  298</a></span>  std::atomic&lt;uint64_t&gt; <a class="code hl_variable" href="classmdf_1_1_mdf_writer.html#acb39fac997fbfe3224aa2796e444f96e">start_time_</a> = 0;     </div>
<div class="line"><a id="l00299" name="l00299"></a><span class="lineno"><a class="line" href="classmdf_1_1_mdf_writer.html#a9392b77baecf6dc01410113c7d1124fd">  299</a></span>  std::atomic&lt;uint64_t&gt; <a class="code hl_variable" href="classmdf_1_1_mdf_writer.html#a9392b77baecf6dc01410113c7d1124fd">stop_time_</a> = 0;      </div>
<div class="line"><a id="l00300" name="l00300"></a><span class="lineno">  300</span> </div>
<div class="line"><a id="l00301" name="l00301"></a><span class="lineno"><a class="line" href="classmdf_1_1_mdf_writer.html#a8f1edfaf99512d98f9c4efae55db2aca">  301</a></span>  std::thread <a class="code hl_variable" href="classmdf_1_1_mdf_writer.html#a8f1edfaf99512d98f9c4efae55db2aca">work_thread_</a>; </div>
<div class="line"><a id="l00302" name="l00302"></a><span class="lineno"><a class="line" href="classmdf_1_1_mdf_writer.html#a4170285d6cdb2d83c76b6f96f0a14d51">  302</a></span>  std::atomic_bool <a class="code hl_variable" href="classmdf_1_1_mdf_writer.html#a4170285d6cdb2d83c76b6f96f0a14d51">stop_thread_</a> = <span class="keyword">false</span>; </div>
<div class="line"><a id="l00303" name="l00303"></a><span class="lineno"><a class="line" href="classmdf_1_1_mdf_writer.html#a66769aea122dfd6a2b5d5a1a0115e70f">  303</a></span>  std::mutex <a class="code hl_variable" href="classmdf_1_1_mdf_writer.html#a66769aea122dfd6a2b5d5a1a0115e70f">locker_</a>; </div>
<div class="line"><a id="l00304" name="l00304"></a><span class="lineno"><a class="line" href="classmdf_1_1_mdf_writer.html#a205310a2f576e2fb5e4781e3d58079da">  304</a></span>  std::condition_variable <a class="code hl_variable" href="classmdf_1_1_mdf_writer.html#a205310a2f576e2fb5e4781e3d58079da">sample_event_</a>; </div>
<div class="line"><a id="l00305" name="l00305"></a><span class="lineno"><a class="line" href="classmdf_1_1_mdf_writer.html#aeeefd88243c255f5d89eced5b3f0b4c1">  305</a></span>  std::atomic&lt;size_t&gt; <a class="code hl_variable" href="classmdf_1_1_mdf_writer.html#aeeefd88243c255f5d89eced5b3f0b4c1">sample_queue_size_</a> = 0; </div>
<div class="line"><a id="l00306" name="l00306"></a><span class="lineno">  306</span> </div>
<div class="line"><a id="l00307" name="l00307"></a><span class="lineno"><a class="line" href="classmdf_1_1_mdf_writer.html#af3349ed375bcd1ce756b5c595357d4a1">  307</a></span>  <span class="keyword">using </span><a class="code hl_typedef" href="classmdf_1_1_mdf_writer.html#af3349ed375bcd1ce756b5c595357d4a1">SampleQueue</a> = std::deque&lt;SampleRecord&gt;; </div>
<div class="line"><a id="l00308" name="l00308"></a><span class="lineno"><a class="line" href="classmdf_1_1_mdf_writer.html#a252be13c93ed60b1d6159b489c441af3">  308</a></span>  <a class="code hl_typedef" href="classmdf_1_1_mdf_writer.html#af3349ed375bcd1ce756b5c595357d4a1">SampleQueue</a> <a class="code hl_variable" href="classmdf_1_1_mdf_writer.html#a252be13c93ed60b1d6159b489c441af3">sample_queue_</a>; </div>
<div class="line"><a id="l00309" name="l00309"></a><span class="lineno">  309</span> </div>
<div class="line"><a id="l00310" name="l00310"></a><span class="lineno"><a class="line" href="classmdf_1_1_mdf_writer.html#a721891be071fddad2b6af188219045ac">  310</a></span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classmdf_1_1_mdf_writer.html#a721891be071fddad2b6af188219045ac">CreateMdfFile</a>() = 0; </div>
<div class="line"><a id="l00311" name="l00311"></a><span class="lineno"><a class="line" href="classmdf_1_1_mdf_writer.html#a42d796e6c4585807d2750ccbe6439fbe">  311</a></span>  <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="classmdf_1_1_mdf_writer.html#a42d796e6c4585807d2750ccbe6439fbe">PrepareForWriting</a>() = 0; </div>
<div class="line"><a id="l00312" name="l00312"></a><span class="lineno"><a class="line" href="classmdf_1_1_mdf_writer.html#ad743448dd8c0cb8e3b789ec6ca14d58b">  312</a></span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classmdf_1_1_mdf_writer.html#ad743448dd8c0cb8e3b789ec6ca14d58b">SetDataPosition</a>(std::FILE* file); </div>
<div class="line"><a id="l00313" name="l00313"></a><span class="lineno"><a class="line" href="classmdf_1_1_mdf_writer.html#a784782ad33d0eced9e381dc4268b1edc">  313</a></span>  <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="classmdf_1_1_mdf_writer.html#a784782ad33d0eced9e381dc4268b1edc">WriteSignalData</a>(std::FILE* file); </div>
<div class="line"><a id="l00314" name="l00314"></a><span class="lineno">  314</span> </div>
<div class="line"><a id="l00315" name="l00315"></a><span class="lineno"><a class="line" href="classmdf_1_1_mdf_writer.html#ad0692dbf74cfab4927b0d506012e43ae">  315</a></span>  <span class="keywordtype">void</span> <a class="code hl_function" href="classmdf_1_1_mdf_writer.html#ad0692dbf74cfab4927b0d506012e43ae">StopWorkThread</a>(); </div>
<div class="line"><a id="l00316" name="l00316"></a><span class="lineno"><a class="line" href="classmdf_1_1_mdf_writer.html#a2a06601bdf4555985c51d1dcead87a35">  316</a></span>  <span class="keywordtype">void</span> <a class="code hl_function" href="classmdf_1_1_mdf_writer.html#a2a06601bdf4555985c51d1dcead87a35">WorkThread</a>(); </div>
<div class="line"><a id="l00317" name="l00317"></a><span class="lineno">  317</span> </div>
<div class="line"><a id="l00318" name="l00318"></a><span class="lineno"><a class="line" href="classmdf_1_1_mdf_writer.html#acd5d75e685ecf3f6e7b77eacedeac481">  318</a></span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classmdf_1_1_mdf_writer.html#acd5d75e685ecf3f6e7b77eacedeac481">TrimQueue</a>(); </div>
<div class="line"><a id="l00320" name="l00320"></a><span class="lineno"><a class="line" href="classmdf_1_1_mdf_writer.html#ace4406346036a0740b37f78f61da3c54">  320</a></span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classmdf_1_1_mdf_writer.html#ace4406346036a0740b37f78f61da3c54">SaveQueue</a>(std::unique_lock&lt;std::mutex&gt;&amp; lock);</div>
<div class="line"><a id="l00322" name="l00322"></a><span class="lineno"><a class="line" href="classmdf_1_1_mdf_writer.html#ab3f37a03e9cf60642af1ca573836e2c8">  322</a></span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classmdf_1_1_mdf_writer.html#ab3f37a03e9cf60642af1ca573836e2c8">CleanQueue</a>(std::unique_lock&lt;std::mutex&gt;&amp; lock);</div>
<div class="line"><a id="l00324" name="l00324"></a><span class="lineno"><a class="line" href="classmdf_1_1_mdf_writer.html#ac750827df8d944250173df2528f0dcfb">  324</a></span>  <span class="keywordtype">void</span> <a class="code hl_function" href="classmdf_1_1_mdf_writer.html#ac750827df8d944250173df2528f0dcfb">IncrementNofSamples</a>(uint64_t record_id) <span class="keyword">const</span>;</div>
<div class="line"><a id="l00326" name="l00326"></a><span class="lineno"><a class="line" href="classmdf_1_1_mdf_writer.html#a5cd4c87e170891cafcfba25081171fa6">  326</a></span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classmdf_1_1_mdf_writer.html#a5cd4c87e170891cafcfba25081171fa6">SetLastPosition</a>(std::FILE* file) = 0;</div>
<div class="line"><a id="l00327" name="l00327"></a><span class="lineno">  327</span> </div>
<div class="line"><a id="l00328" name="l00328"></a><span class="lineno">  328</span> </div>
<div class="line"><a id="l00329" name="l00329"></a><span class="lineno">  329</span> <span class="keyword">private</span>:</div>
<div class="line"><a id="l00330" name="l00330"></a><span class="lineno">  330</span>  <span class="keywordtype">bool</span> compress_data_ = <span class="keyword">false</span>; </div>
<div class="line"><a id="l00331" name="l00331"></a><span class="lineno">  331</span>  <a class="code hl_enumeration" href="namespacemdf.html#ab408474aca4bb3e6fb04416ec3044d40">MdfBusType</a> bus_type_ = <a class="code hl_enumvalue" href="namespacemdf.html#ab408474aca4bb3e6fb04416ec3044d40a696b031073e74bf2cb98e5ef201d4aa3">MdfBusType::UNKNOWN</a>;</div>
<div class="line"><a id="l00332" name="l00332"></a><span class="lineno">  332</span>  <a class="code hl_enumeration" href="namespacemdf.html#a7e87e4f5b259d4a96040c3729bc2d75c">MdfStorageType</a> storage_type_ = <a class="code hl_enumvalue" href="namespacemdf.html#a7e87e4f5b259d4a96040c3729bc2d75ca3ddf6d91674409a2af938290dca6f94c">MdfStorageType::FixedLengthStorage</a>;</div>
<div class="line"><a id="l00333" name="l00333"></a><span class="lineno">  333</span>  uint32_t max_length_ = 8; </div>
<div class="line"><a id="l00334" name="l00334"></a><span class="lineno">  334</span>  std::map&lt;uint64_t, const IChannel*&gt; master_channels_; </div>
<div class="line"><a id="l00335" name="l00335"></a><span class="lineno">  335</span>  <span class="keywordtype">void</span> RecalculateTimeMaster();</div>
<div class="line"><a id="l00336" name="l00336"></a><span class="lineno">  336</span>  <span class="keywordtype">void</span> CreateCanConfig(<a class="code hl_class" href="classmdf_1_1_i_data_group.html">IDataGroup</a>&amp; dg_block) <span class="keyword">const</span>;</div>
<div class="line"><a id="l00337" name="l00337"></a><span class="lineno">  337</span> </div>
<div class="line"><a id="l00356" name="l00356"></a><span class="lineno">  356</span>  <span class="keywordtype">void</span> CreateCanDataFrameChannel(<a class="code hl_class" href="classmdf_1_1_i_channel_group.html">IChannelGroup</a>&amp; group) <span class="keyword">const</span>;</div>
<div class="line"><a id="l00357" name="l00357"></a><span class="lineno">  357</span> </div>
<div class="line"><a id="l00372" name="l00372"></a><span class="lineno">  372</span>  <span class="keywordtype">void</span> CreateCanRemoteFrameChannel(<a class="code hl_class" href="classmdf_1_1_i_channel_group.html">IChannelGroup</a>&amp; group) <span class="keyword">const</span>;</div>
<div class="line"><a id="l00373" name="l00373"></a><span class="lineno">  373</span> </div>
<div class="line"><a id="l00394" name="l00394"></a><span class="lineno">  394</span>  <span class="keywordtype">void</span> CreateCanErrorFrameChannel(<a class="code hl_class" href="classmdf_1_1_i_channel_group.html">IChannelGroup</a>&amp; group) <span class="keyword">const</span>;</div>
<div class="line"><a id="l00395" name="l00395"></a><span class="lineno">  395</span> </div>
<div class="line"><a id="l00405" name="l00405"></a><span class="lineno">  405</span>  <span class="keyword">static</span> <span class="keywordtype">void</span> CreateCanOverloadFrameChannel(<a class="code hl_class" href="classmdf_1_1_i_channel_group.html">IChannelGroup</a>&amp; group);</div>
<div class="line"><a id="l00406" name="l00406"></a><span class="lineno">  406</span>};</div>
</div>
<div class="line"><a id="l00407" name="l00407"></a><span class="lineno">  407</span> </div>
<div class="line"><a id="l00408" name="l00408"></a><span class="lineno">  408</span>}  <span class="comment">// namespace mdf</span></div>
<div class="ttc" id="acanmessage_8h_html"><div class="ttname"><a href="canmessage_8h.html">canmessage.h</a></div><div class="ttdoc">Simple wrapper around a CAN or CAN FD message.</div></div>
<div class="ttc" id="aclassmdf_1_1_can_message_html"><div class="ttname"><a href="classmdf_1_1_can_message.html">mdf::CanMessage</a></div><div class="ttdoc">Helper class when logging CAN and CAN FD messages.</div><div class="ttdef"><b>Definition</b> canmessage.h:47</div></div>
<div class="ttc" id="aclassmdf_1_1_i_channel_conversion_html"><div class="ttname"><a href="classmdf_1_1_i_channel_conversion.html">mdf::IChannelConversion</a></div><div class="ttdoc">Defines a channel conversion (CC) block.</div><div class="ttdef"><b>Definition</b> ichannelconversion.h:142</div></div>
<div class="ttc" id="aclassmdf_1_1_i_channel_group_html"><div class="ttname"><a href="classmdf_1_1_i_channel_group.html">mdf::IChannelGroup</a></div><div class="ttdoc">Interface against a channel group (CG) block.</div><div class="ttdef"><b>Definition</b> ichannelgroup.h:66</div></div>
<div class="ttc" id="aclassmdf_1_1_i_channel_html"><div class="ttname"><a href="classmdf_1_1_i_channel.html">mdf::IChannel</a></div><div class="ttdoc">Defines a MDF channel (CN) block.</div><div class="ttdef"><b>Definition</b> ichannel.h:126</div></div>
<div class="ttc" id="aclassmdf_1_1_i_data_group_html"><div class="ttname"><a href="classmdf_1_1_i_data_group.html">mdf::IDataGroup</a></div><div class="ttdoc">Interface to a data group (DG) block.</div><div class="ttdef"><b>Definition</b> idatagroup.h:42</div></div>
<div class="ttc" id="aclassmdf_1_1_i_header_html"><div class="ttname"><a href="classmdf_1_1_i_header.html">mdf::IHeader</a></div><div class="ttdoc">Interface class against an MDF HD block.</div><div class="ttdef"><b>Definition</b> iheader.h:34</div></div>
<div class="ttc" id="aclassmdf_1_1_i_timestamp_html"><div class="ttname"><a href="classmdf_1_1_i_timestamp.html">mdf::ITimestamp</a></div><div class="ttdoc">Interface for timestamp handling in MDF files.</div><div class="ttdef"><b>Definition</b> itimestamp.h:17</div></div>
<div class="ttc" id="aclassmdf_1_1_mdf_file_html"><div class="ttname"><a href="classmdf_1_1_mdf_file.html">mdf::MdfFile</a></div><div class="ttdoc">Implements an user interface against a MDF file.</div><div class="ttdef"><b>Definition</b> mdffile.h:37</div></div>
<div class="ttc" id="aclassmdf_1_1_mdf_writer_html"><div class="ttname"><a href="classmdf_1_1_mdf_writer.html">mdf::MdfWriter</a></div><div class="ttdoc">Interface against an MDF writer object.</div><div class="ttdef"><b>Definition</b> mdfwriter.h:104</div></div>
<div class="ttc" id="aclassmdf_1_1_mdf_writer_html_a00cfdd411a43942ac094fe2cbfbfba14"><div class="ttname"><a href="classmdf_1_1_mdf_writer.html#a00cfdd411a43942ac094fe2cbfbfba14">mdf::MdfWriter::CreateChannel</a></div><div class="ttdeci">static IChannel * CreateChannel(IChannelGroup *parent)</div><div class="ttdoc">Creates a new channel (CN) block.</div></div>
<div class="ttc" id="aclassmdf_1_1_mdf_writer_html_a0674674943a903ffff27c91fdfbc6c87"><div class="ttname"><a href="classmdf_1_1_mdf_writer.html#a0674674943a903ffff27c91fdfbc6c87">mdf::MdfWriter::StorageType</a></div><div class="ttdeci">MdfStorageType StorageType() const</div><div class="ttdoc">Returns the type of data storage the MDF file is associated with. Only used when doing bus logging.</div><div class="ttdef"><b>Definition</b> mdfwriter.h:262</div></div>
<div class="ttc" id="aclassmdf_1_1_mdf_writer_html_a0a15689cb48b10b4dc33cf4f145a9a8f"><div class="ttname"><a href="classmdf_1_1_mdf_writer.html#a0a15689cb48b10b4dc33cf4f145a9a8f">mdf::MdfWriter::BusType</a></div><div class="ttdeci">void BusType(MdfBusType type)</div><div class="ttdoc">Only used when doing bus logging. It defines the default channel and channel group names when doing b...</div><div class="ttdef"><b>Definition</b> mdfwriter.h:227</div></div>
<div class="ttc" id="aclassmdf_1_1_mdf_writer_html_a0bdf7185c7edb044c1d8ee2a315e1c86"><div class="ttname"><a href="classmdf_1_1_mdf_writer.html#a0bdf7185c7edb044c1d8ee2a315e1c86">mdf::MdfWriter::pre_trig_time_</a></div><div class="ttdeci">std::atomic&lt; uint64_t &gt; pre_trig_time_</div><div class="ttdoc">Nanoseconds difference.</div><div class="ttdef"><b>Definition</b> mdfwriter.h:297</div></div>
<div class="ttc" id="aclassmdf_1_1_mdf_writer_html_a1baf7d66ae7faa71c437a3a7274545ee"><div class="ttname"><a href="classmdf_1_1_mdf_writer.html#a1baf7d66ae7faa71c437a3a7274545ee">mdf::MdfWriter::CompressData</a></div><div class="ttdeci">bool CompressData() const</div><div class="ttdoc">Returns true if the data block is compressed.</div><div class="ttdef"><b>Definition</b> mdfwriter.h:280</div></div>
<div class="ttc" id="aclassmdf_1_1_mdf_writer_html_a205310a2f576e2fb5e4781e3d58079da"><div class="ttname"><a href="classmdf_1_1_mdf_writer.html#a205310a2f576e2fb5e4781e3d58079da">mdf::MdfWriter::sample_event_</a></div><div class="ttdeci">std::condition_variable sample_event_</div><div class="ttdoc">Used internally.</div><div class="ttdef"><b>Definition</b> mdfwriter.h:304</div></div>
<div class="ttc" id="aclassmdf_1_1_mdf_writer_html_a225dba7a33abbf4097c79de1a01e7c48"><div class="ttname"><a href="classmdf_1_1_mdf_writer.html#a225dba7a33abbf4097c79de1a01e7c48">mdf::MdfWriter::FinalizeMeasurement</a></div><div class="ttdeci">virtual bool FinalizeMeasurement()</div><div class="ttdoc">Stop the sample queue and write all unwritten blocks to the file.</div></div>
<div class="ttc" id="aclassmdf_1_1_mdf_writer_html_a252be13c93ed60b1d6159b489c441af3"><div class="ttname"><a href="classmdf_1_1_mdf_writer.html#a252be13c93ed60b1d6159b489c441af3">mdf::MdfWriter::sample_queue_</a></div><div class="ttdeci">SampleQueue sample_queue_</div><div class="ttdoc">Sample queue.</div><div class="ttdef"><b>Definition</b> mdfwriter.h:308</div></div>
<div class="ttc" id="aclassmdf_1_1_mdf_writer_html_a26311c47fba7773402efc64c969de767"><div class="ttname"><a href="classmdf_1_1_mdf_writer.html#a26311c47fba7773402efc64c969de767">mdf::MdfWriter::CreateDataGroup</a></div><div class="ttdeci">IDataGroup * CreateDataGroup()</div><div class="ttdoc">Create a new data group (DG) block.</div></div>
<div class="ttc" id="aclassmdf_1_1_mdf_writer_html_a2a06601bdf4555985c51d1dcead87a35"><div class="ttname"><a href="classmdf_1_1_mdf_writer.html#a2a06601bdf4555985c51d1dcead87a35">mdf::MdfWriter::WorkThread</a></div><div class="ttdeci">void WorkThread()</div><div class="ttdoc">Worker thread function.</div></div>
<div class="ttc" id="aclassmdf_1_1_mdf_writer_html_a2a4afa5ae8c5e296a9c86c1e9e35f9af"><div class="ttname"><a href="classmdf_1_1_mdf_writer.html#a2a4afa5ae8c5e296a9c86c1e9e35f9af">mdf::MdfWriter::PreTrigTime</a></div><div class="ttdeci">double PreTrigTime() const</div><div class="ttdoc">Pre-trig time (s).</div></div>
<div class="ttc" id="aclassmdf_1_1_mdf_writer_html_a2b75266333ae91f1091d5860e718797f"><div class="ttname"><a href="classmdf_1_1_mdf_writer.html#a2b75266333ae91f1091d5860e718797f">mdf::MdfWriter::mdf_file_</a></div><div class="ttdeci">std::unique_ptr&lt; MdfFile &gt; mdf_file_</div><div class="ttdoc">Holds the actual file object.</div><div class="ttdef"><b>Definition</b> mdfwriter.h:294</div></div>
<div class="ttc" id="aclassmdf_1_1_mdf_writer_html_a2c990a789c1c8ac3c9de57a5a7904aa4"><div class="ttname"><a href="classmdf_1_1_mdf_writer.html#a2c990a789c1c8ac3c9de57a5a7904aa4">mdf::MdfWriter::StartMeasurement</a></div><div class="ttdeci">virtual void StartMeasurement(ITimestamp &amp;start_time)</div><div class="ttdoc">Starts the measurement.</div></div>
<div class="ttc" id="aclassmdf_1_1_mdf_writer_html_a3d8644bac04ec6f8189a216967fd3705"><div class="ttname"><a href="classmdf_1_1_mdf_writer.html#a3d8644bac04ec6f8189a216967fd3705">mdf::MdfWriter::StartMeasurement</a></div><div class="ttdeci">virtual void StartMeasurement(uint64_t start_time)</div><div class="ttdoc">Starts the measurement.</div></div>
<div class="ttc" id="aclassmdf_1_1_mdf_writer_html_a3e1c278164191a0f0c21bcb650153aa3"><div class="ttname"><a href="classmdf_1_1_mdf_writer.html#a3e1c278164191a0f0c21bcb650153aa3">mdf::MdfWriter::SaveCanMessage</a></div><div class="ttdeci">void SaveCanMessage(const IChannelGroup &amp;group, uint64_t time, const CanMessage &amp;msg)</div><div class="ttdoc">Saves a CAN message into a bus logger channel group.</div></div>
<div class="ttc" id="aclassmdf_1_1_mdf_writer_html_a3efa37375f9f6ce516ca1ed00dc987e9"><div class="ttname"><a href="classmdf_1_1_mdf_writer.html#a3efa37375f9f6ce516ca1ed00dc987e9">mdf::MdfWriter::StopMeasurement</a></div><div class="ttdeci">virtual void StopMeasurement(ITimestamp &amp;start_time)</div><div class="ttdoc">Stops the measurement.</div></div>
<div class="ttc" id="aclassmdf_1_1_mdf_writer_html_a4170285d6cdb2d83c76b6f96f0a14d51"><div class="ttname"><a href="classmdf_1_1_mdf_writer.html#a4170285d6cdb2d83c76b6f96f0a14d51">mdf::MdfWriter::stop_thread_</a></div><div class="ttdeci">std::atomic_bool stop_thread_</div><div class="ttdoc">Set to true to stop the thread.</div><div class="ttdef"><b>Definition</b> mdfwriter.h:302</div></div>
<div class="ttc" id="aclassmdf_1_1_mdf_writer_html_a42d796e6c4585807d2750ccbe6439fbe"><div class="ttname"><a href="classmdf_1_1_mdf_writer.html#a42d796e6c4585807d2750ccbe6439fbe">mdf::MdfWriter::PrepareForWriting</a></div><div class="ttdeci">virtual bool PrepareForWriting()=0</div><div class="ttdoc">Prepare for writing.</div></div>
<div class="ttc" id="aclassmdf_1_1_mdf_writer_html_a43e622ce5737cf5115aadc32536c4018"><div class="ttname"><a href="classmdf_1_1_mdf_writer.html#a43e622ce5737cf5115aadc32536c4018">mdf::MdfWriter::GetFile</a></div><div class="ttdeci">MdfFile * GetFile() const</div><div class="ttdoc">Returns the MDF file interface.</div><div class="ttdef"><b>Definition</b> mdfwriter.h:150</div></div>
<div class="ttc" id="aclassmdf_1_1_mdf_writer_html_a515e3740c9f9314e1bcc69a420813652"><div class="ttname"><a href="classmdf_1_1_mdf_writer.html#a515e3740c9f9314e1bcc69a420813652">mdf::MdfWriter::CreateBusLogConfiguration</a></div><div class="ttdeci">bool CreateBusLogConfiguration()</div><div class="ttdoc">Creates all default DG, CG and CN blocks that bus loggers uses.</div></div>
<div class="ttc" id="aclassmdf_1_1_mdf_writer_html_a5cba5efbf74443c0831289f616e1e174"><div class="ttname"><a href="classmdf_1_1_mdf_writer.html#a5cba5efbf74443c0831289f616e1e174">mdf::MdfWriter::StorageType</a></div><div class="ttdeci">void StorageType(MdfStorageType type)</div><div class="ttdoc">Only used when doing bus logging. It defines how raw data is stored.</div><div class="ttdef"><b>Definition</b> mdfwriter.h:256</div></div>
<div class="ttc" id="aclassmdf_1_1_mdf_writer_html_a5cd4c87e170891cafcfba25081171fa6"><div class="ttname"><a href="classmdf_1_1_mdf_writer.html#a5cd4c87e170891cafcfba25081171fa6">mdf::MdfWriter::SetLastPosition</a></div><div class="ttdeci">virtual void SetLastPosition(std::FILE *file)=0</div><div class="ttdoc">Set the last file position.</div></div>
<div class="ttc" id="aclassmdf_1_1_mdf_writer_html_a62ed99c7938eea491b4ab7e30fa2a9f8"><div class="ttname"><a href="classmdf_1_1_mdf_writer.html#a62ed99c7938eea491b4ab7e30fa2a9f8">mdf::MdfWriter::CreateChannelGroup</a></div><div class="ttdeci">static IChannelGroup * CreateChannelGroup(IDataGroup *parent)</div><div class="ttdoc">Create a new channel group (CG) block.</div></div>
<div class="ttc" id="aclassmdf_1_1_mdf_writer_html_a66769aea122dfd6a2b5d5a1a0115e70f"><div class="ttname"><a href="classmdf_1_1_mdf_writer.html#a66769aea122dfd6a2b5d5a1a0115e70f">mdf::MdfWriter::locker_</a></div><div class="ttdeci">std::mutex locker_</div><div class="ttdoc">Mutex for thread-safe handling of the sample queue.</div><div class="ttdef"><b>Definition</b> mdfwriter.h:303</div></div>
<div class="ttc" id="aclassmdf_1_1_mdf_writer_html_a6b6d60272eedb8817c7a480620ec5e02"><div class="ttname"><a href="classmdf_1_1_mdf_writer.html#a6b6d60272eedb8817c7a480620ec5e02">mdf::MdfWriter::PreTrigTime</a></div><div class="ttdeci">void PreTrigTime(double pre_trig_time)</div><div class="ttdoc">Sets the pre-trig time (s) of the writer.</div></div>
<div class="ttc" id="aclassmdf_1_1_mdf_writer_html_a721891be071fddad2b6af188219045ac"><div class="ttname"><a href="classmdf_1_1_mdf_writer.html#a721891be071fddad2b6af188219045ac">mdf::MdfWriter::CreateMdfFile</a></div><div class="ttdeci">virtual void CreateMdfFile()=0</div><div class="ttdoc">Creates an MDF file.</div></div>
<div class="ttc" id="aclassmdf_1_1_mdf_writer_html_a77e457f8f1b7d048a7b575b94a4f3b2f"><div class="ttname"><a href="classmdf_1_1_mdf_writer.html#a77e457f8f1b7d048a7b575b94a4f3b2f">mdf::MdfWriter::Init</a></div><div class="ttdeci">bool Init(const std::string &amp;filename)</div><div class="ttdoc">Initiate the file.</div></div>
<div class="ttc" id="aclassmdf_1_1_mdf_writer_html_a784782ad33d0eced9e381dc4268b1edc"><div class="ttname"><a href="classmdf_1_1_mdf_writer.html#a784782ad33d0eced9e381dc4268b1edc">mdf::MdfWriter::WriteSignalData</a></div><div class="ttdeci">virtual bool WriteSignalData(std::FILE *file)</div><div class="ttdoc">Write an SD block.</div></div>
<div class="ttc" id="aclassmdf_1_1_mdf_writer_html_a8347d854796a708b17e3ed585de12d63"><div class="ttname"><a href="classmdf_1_1_mdf_writer.html#a8347d854796a708b17e3ed585de12d63">mdf::MdfWriter::BusType</a></div><div class="ttdeci">MdfBusType BusType() const</div><div class="ttdoc">Returns the type of bus the MDF file is associated with. Only used when doing bus logging.</div><div class="ttdef"><b>Definition</b> mdfwriter.h:233</div></div>
<div class="ttc" id="aclassmdf_1_1_mdf_writer_html_a862e5393e4d212b9ff96c1acbf3b1270"><div class="ttname"><a href="classmdf_1_1_mdf_writer.html#a862e5393e4d212b9ff96c1acbf3b1270">mdf::MdfWriter::filename_</a></div><div class="ttdeci">std::string filename_</div><div class="ttdoc">Full name of file with path and extension.</div><div class="ttdef"><b>Definition</b> mdfwriter.h:295</div></div>
<div class="ttc" id="aclassmdf_1_1_mdf_writer_html_a8809959955cbbadc95c0d2a1789eb784"><div class="ttname"><a href="classmdf_1_1_mdf_writer.html#a8809959955cbbadc95c0d2a1789eb784">mdf::MdfWriter::CreateChannelConversion</a></div><div class="ttdeci">virtual IChannelConversion * CreateChannelConversion(IChannel *parent)=0</div><div class="ttdoc">Create a new channel conversion (CC) block.</div></div>
<div class="ttc" id="aclassmdf_1_1_mdf_writer_html_a89012f9568a274e1d66fb444452256aa"><div class="ttname"><a href="classmdf_1_1_mdf_writer.html#a89012f9568a274e1d66fb444452256aa">mdf::MdfWriter::CompressData</a></div><div class="ttdeci">void CompressData(bool compress)</div><div class="ttdoc">If set to true, the data block will be compressed.</div><div class="ttdef"><b>Definition</b> mdfwriter.h:278</div></div>
<div class="ttc" id="aclassmdf_1_1_mdf_writer_html_a8ae87053a772a46a7ad599f14c2c0521"><div class="ttname"><a href="classmdf_1_1_mdf_writer.html#a8ae87053a772a46a7ad599f14c2c0521">mdf::MdfWriter::SaveSample</a></div><div class="ttdeci">virtual void SaveSample(const IChannelGroup &amp;group, uint64_t time)</div><div class="ttdoc">Saves a sample record for a channel group.</div></div>
<div class="ttc" id="aclassmdf_1_1_mdf_writer_html_a8f1edfaf99512d98f9c4efae55db2aca"><div class="ttname"><a href="classmdf_1_1_mdf_writer.html#a8f1edfaf99512d98f9c4efae55db2aca">mdf::MdfWriter::work_thread_</a></div><div class="ttdeci">std::thread work_thread_</div><div class="ttdoc">Sample queue thread.</div><div class="ttdef"><b>Definition</b> mdfwriter.h:301</div></div>
<div class="ttc" id="aclassmdf_1_1_mdf_writer_html_a9392b77baecf6dc01410113c7d1124fd"><div class="ttname"><a href="classmdf_1_1_mdf_writer.html#a9392b77baecf6dc01410113c7d1124fd">mdf::MdfWriter::stop_time_</a></div><div class="ttdeci">std::atomic&lt; uint64_t &gt; stop_time_</div><div class="ttdoc">Nanoseconds since 1970.</div><div class="ttdef"><b>Definition</b> mdfwriter.h:299</div></div>
<div class="ttc" id="aclassmdf_1_1_mdf_writer_html_a99e1aa5229ebbee9ee533e6a9d12445c"><div class="ttname"><a href="classmdf_1_1_mdf_writer.html#a99e1aa5229ebbee9ee533e6a9d12445c">mdf::MdfWriter::InitMeasurement</a></div><div class="ttdeci">virtual bool InitMeasurement()</div><div class="ttdoc">Initialize the sample queue and write any unwritten block to the file.</div></div>
<div class="ttc" id="aclassmdf_1_1_mdf_writer_html_aa1db4cc3f1c198bf4bb21787a2977da2"><div class="ttname"><a href="classmdf_1_1_mdf_writer.html#aa1db4cc3f1c198bf4bb21787a2977da2">mdf::MdfWriter::BusTypeAsString</a></div><div class="ttdeci">std::string_view BusTypeAsString() const</div><div class="ttdoc">Returns the bus type as text.</div></div>
<div class="ttc" id="aclassmdf_1_1_mdf_writer_html_aa4863f697ceb1809e37952b59ffd1d5d"><div class="ttname"><a href="classmdf_1_1_mdf_writer.html#aa4863f697ceb1809e37952b59ffd1d5d">mdf::MdfWriter::StartTime</a></div><div class="ttdeci">uint64_t StartTime() const</div><div class="ttdoc">Returns start time in nano-seconds since 1970.</div><div class="ttdef"><b>Definition</b> mdfwriter.h:139</div></div>
<div class="ttc" id="aclassmdf_1_1_mdf_writer_html_aae1d91dced5a573d6862fc1db77c0468"><div class="ttname"><a href="classmdf_1_1_mdf_writer.html#aae1d91dced5a573d6862fc1db77c0468">mdf::MdfWriter::Header</a></div><div class="ttdeci">IHeader * Header() const</div><div class="ttdoc">Returns the header block (HD).</div></div>
<div class="ttc" id="aclassmdf_1_1_mdf_writer_html_ab23f3e5d955e7d86632ff6333cb73871"><div class="ttname"><a href="classmdf_1_1_mdf_writer.html#ab23f3e5d955e7d86632ff6333cb73871">mdf::MdfWriter::~MdfWriter</a></div><div class="ttdeci">virtual ~MdfWriter()</div><div class="ttdoc">Default destructor.</div></div>
<div class="ttc" id="aclassmdf_1_1_mdf_writer_html_ab3f37a03e9cf60642af1ca573836e2c8"><div class="ttname"><a href="classmdf_1_1_mdf_writer.html#ab3f37a03e9cf60642af1ca573836e2c8">mdf::MdfWriter::CleanQueue</a></div><div class="ttdeci">virtual void CleanQueue(std::unique_lock&lt; std::mutex &gt; &amp;lock)</div><div class="ttdoc">Flush the sample queue.</div></div>
<div class="ttc" id="aclassmdf_1_1_mdf_writer_html_ab826f4056726222307602355e4949c79"><div class="ttname"><a href="classmdf_1_1_mdf_writer.html#ab826f4056726222307602355e4949c79">mdf::MdfWriter::write_state_</a></div><div class="ttdeci">std::atomic&lt; WriteState &gt; write_state_</div><div class="ttdoc">Keeps track of the worker thread state.</div><div class="ttdef"><b>Definition</b> mdfwriter.h:291</div></div>
<div class="ttc" id="aclassmdf_1_1_mdf_writer_html_ac5cc8e6a096cdb641a7a36efbc2793af"><div class="ttname"><a href="classmdf_1_1_mdf_writer.html#ac5cc8e6a096cdb641a7a36efbc2793af">mdf::MdfWriter::MdfWriter</a></div><div class="ttdeci">MdfWriter()=default</div><div class="ttdoc">Default constructor.</div></div>
<div class="ttc" id="aclassmdf_1_1_mdf_writer_html_ac750827df8d944250173df2528f0dcfb"><div class="ttname"><a href="classmdf_1_1_mdf_writer.html#ac750827df8d944250173df2528f0dcfb">mdf::MdfWriter::IncrementNofSamples</a></div><div class="ttdeci">void IncrementNofSamples(uint64_t record_id) const</div><div class="ttdoc">Increment the sample counter.</div></div>
<div class="ttc" id="aclassmdf_1_1_mdf_writer_html_acb39fac997fbfe3224aa2796e444f96e"><div class="ttname"><a href="classmdf_1_1_mdf_writer.html#acb39fac997fbfe3224aa2796e444f96e">mdf::MdfWriter::start_time_</a></div><div class="ttdeci">std::atomic&lt; uint64_t &gt; start_time_</div><div class="ttdoc">Nanoseconds since 1970.</div><div class="ttdef"><b>Definition</b> mdfwriter.h:298</div></div>
<div class="ttc" id="aclassmdf_1_1_mdf_writer_html_acd5d75e685ecf3f6e7b77eacedeac481"><div class="ttname"><a href="classmdf_1_1_mdf_writer.html#acd5d75e685ecf3f6e7b77eacedeac481">mdf::MdfWriter::TrimQueue</a></div><div class="ttdeci">virtual void TrimQueue()</div><div class="ttdoc">Trims the sample queue.</div></div>
<div class="ttc" id="aclassmdf_1_1_mdf_writer_html_ace4406346036a0740b37f78f61da3c54"><div class="ttname"><a href="classmdf_1_1_mdf_writer.html#ace4406346036a0740b37f78f61da3c54">mdf::MdfWriter::SaveQueue</a></div><div class="ttdeci">virtual void SaveQueue(std::unique_lock&lt; std::mutex &gt; &amp;lock)</div><div class="ttdoc">Saves the queue to file.</div></div>
<div class="ttc" id="aclassmdf_1_1_mdf_writer_html_ad0692dbf74cfab4927b0d506012e43ae"><div class="ttname"><a href="classmdf_1_1_mdf_writer.html#ad0692dbf74cfab4927b0d506012e43ae">mdf::MdfWriter::StopWorkThread</a></div><div class="ttdeci">void StopWorkThread()</div><div class="ttdoc">Stops the worker thread.</div></div>
<div class="ttc" id="aclassmdf_1_1_mdf_writer_html_ad743448dd8c0cb8e3b789ec6ca14d58b"><div class="ttname"><a href="classmdf_1_1_mdf_writer.html#ad743448dd8c0cb8e3b789ec6ca14d58b">mdf::MdfWriter::SetDataPosition</a></div><div class="ttdeci">virtual void SetDataPosition(std::FILE *file)</div><div class="ttdoc">Set the data position.</div></div>
<div class="ttc" id="aclassmdf_1_1_mdf_writer_html_adadc2746aad9d59686ca5a984404c69f"><div class="ttname"><a href="classmdf_1_1_mdf_writer.html#adadc2746aad9d59686ca5a984404c69f">mdf::MdfWriter::WriteState</a></div><div class="ttdeci">WriteState</div><div class="ttdoc">Internal state of the thread.</div><div class="ttdef"><b>Definition</b> mdfwriter.h:284</div></div>
<div class="ttc" id="aclassmdf_1_1_mdf_writer_html_adadc2746aad9d59686ca5a984404c69fa4f243ebd916a3b0988217b1173b49816"><div class="ttname"><a href="classmdf_1_1_mdf_writer.html#adadc2746aad9d59686ca5a984404c69fa4f243ebd916a3b0988217b1173b49816">mdf::MdfWriter::WriteState::StopMeas</a></div><div class="ttdeci">@ StopMeas</div><div class="ttdoc">Stop saving samples. OK to.</div></div>
<div class="ttc" id="aclassmdf_1_1_mdf_writer_html_adadc2746aad9d59686ca5a984404c69fa5f686f3e8ee5b33ba455d12ddd5bbb0b"><div class="ttname"><a href="classmdf_1_1_mdf_writer.html#adadc2746aad9d59686ca5a984404c69fa5f686f3e8ee5b33ba455d12ddd5bbb0b">mdf::MdfWriter::WriteState::StartMeas</a></div><div class="ttdeci">@ StartMeas</div><div class="ttdoc">Start saving samples to file.</div></div>
<div class="ttc" id="aclassmdf_1_1_mdf_writer_html_adadc2746aad9d59686ca5a984404c69fa686e697538050e4664636337cc3b834f"><div class="ttname"><a href="classmdf_1_1_mdf_writer.html#adadc2746aad9d59686ca5a984404c69fa686e697538050e4664636337cc3b834f">mdf::MdfWriter::WriteState::Create</a></div><div class="ttdeci">@ Create</div><div class="ttdoc">Only at first measurement.</div></div>
<div class="ttc" id="aclassmdf_1_1_mdf_writer_html_adadc2746aad9d59686ca5a984404c69fa95b19f7739b0b7ea7d6b07586be54f36"><div class="ttname"><a href="classmdf_1_1_mdf_writer.html#adadc2746aad9d59686ca5a984404c69fa95b19f7739b0b7ea7d6b07586be54f36">mdf::MdfWriter::WriteState::Init</a></div><div class="ttdeci">@ Init</div><div class="ttdoc">Start work thread and start collecting samples.</div></div>
<div class="ttc" id="aclassmdf_1_1_mdf_writer_html_adadc2746aad9d59686ca5a984404c69fafd565de81da1c94807c0b80840ba18b0"><div class="ttname"><a href="classmdf_1_1_mdf_writer.html#adadc2746aad9d59686ca5a984404c69fafd565de81da1c94807c0b80840ba18b0">mdf::MdfWriter::WriteState::Finalize</a></div><div class="ttdeci">@ Finalize</div><div class="ttdoc">OK to add new DG and CG blocks.</div></div>
<div class="ttc" id="aclassmdf_1_1_mdf_writer_html_ae2a8836a711bae7b437f1e5aeb6424e7"><div class="ttname"><a href="classmdf_1_1_mdf_writer.html#ae2a8836a711bae7b437f1e5aeb6424e7">mdf::MdfWriter::StopMeasurement</a></div><div class="ttdeci">virtual void StopMeasurement(uint64_t stop_time)</div><div class="ttdoc">Stops the measurement.</div></div>
<div class="ttc" id="aclassmdf_1_1_mdf_writer_html_ae49cb5ee7246cbd5e8ef7074c74baf62"><div class="ttname"><a href="classmdf_1_1_mdf_writer.html#ae49cb5ee7246cbd5e8ef7074c74baf62">mdf::MdfWriter::MaxLength</a></div><div class="ttdeci">void MaxLength(uint32_t max_length)</div><div class="ttdoc">Sets max number of payload data bytes.</div><div class="ttdef"><b>Definition</b> mdfwriter.h:272</div></div>
<div class="ttc" id="aclassmdf_1_1_mdf_writer_html_ae6896328957c4cba89dbde77669207cb"><div class="ttname"><a href="classmdf_1_1_mdf_writer.html#ae6896328957c4cba89dbde77669207cb">mdf::MdfWriter::IsFileNew</a></div><div class="ttdeci">bool IsFileNew() const</div><div class="ttdoc">Returns true if this is a new file.</div><div class="ttdef"><b>Definition</b> mdfwriter.h:125</div></div>
<div class="ttc" id="aclassmdf_1_1_mdf_writer_html_ae6a7507cdd19b31939f438fcd432583a"><div class="ttname"><a href="classmdf_1_1_mdf_writer.html#ae6a7507cdd19b31939f438fcd432583a">mdf::MdfWriter::MaxLength</a></div><div class="ttdeci">uint32_t MaxLength() const</div><div class="ttdoc">Returns maximum number of payload data bytes.</div><div class="ttdef"><b>Definition</b> mdfwriter.h:275</div></div>
<div class="ttc" id="aclassmdf_1_1_mdf_writer_html_aeeefd88243c255f5d89eced5b3f0b4c1"><div class="ttname"><a href="classmdf_1_1_mdf_writer.html#aeeefd88243c255f5d89eced5b3f0b4c1">mdf::MdfWriter::sample_queue_size_</a></div><div class="ttdeci">std::atomic&lt; size_t &gt; sample_queue_size_</div><div class="ttdoc">Used to trig flushing to disc.</div><div class="ttdef"><b>Definition</b> mdfwriter.h:305</div></div>
<div class="ttc" id="aclassmdf_1_1_mdf_writer_html_aef88554f1428a4b31233e1bcc88cf2d4"><div class="ttname"><a href="classmdf_1_1_mdf_writer.html#aef88554f1428a4b31233e1bcc88cf2d4">mdf::MdfWriter::StopTime</a></div><div class="ttdeci">uint64_t StopTime() const</div><div class="ttdoc">Returns stop time in nano-seconds since 1970.</div><div class="ttdef"><b>Definition</b> mdfwriter.h:141</div></div>
<div class="ttc" id="aclassmdf_1_1_mdf_writer_html_af3349ed375bcd1ce756b5c595357d4a1"><div class="ttname"><a href="classmdf_1_1_mdf_writer.html#af3349ed375bcd1ce756b5c595357d4a1">mdf::MdfWriter::SampleQueue</a></div><div class="ttdeci">std::deque&lt; SampleRecord &gt; SampleQueue</div><div class="ttdoc">Sample queue.</div><div class="ttdef"><b>Definition</b> mdfwriter.h:307</div></div>
<div class="ttc" id="aclassmdf_1_1_mdf_writer_html_afcf1395a8dffe0b70b9e9be0e9731498"><div class="ttname"><a href="classmdf_1_1_mdf_writer.html#afcf1395a8dffe0b70b9e9be0e9731498">mdf::MdfWriter::Name</a></div><div class="ttdeci">std::string Name() const</div><div class="ttdoc">Returns the filename without extension and path (stem).</div></div>
<div class="ttc" id="amdffile_8h_html"><div class="ttname"><a href="mdffile_8h.html">mdffile.h</a></div><div class="ttdoc">Interface against an MDF file object.</div></div>
<div class="ttc" id="anamespacemdf_html"><div class="ttname"><a href="namespacemdf.html">mdf</a></div><div class="ttdoc">Main namespace for the MDF library.</div><div class="ttdef"><b>Definition</b> canmessage.h:17</div></div>
<div class="ttc" id="anamespacemdf_html_a7d8062669e05a387de168820f98d4ff6a01ae658e39b5a3a94590c6d88cffe050"><div class="ttname"><a href="namespacemdf.html#a7d8062669e05a387de168820f98d4ff6a01ae658e39b5a3a94590c6d88cffe050">mdf::BusType::FlexRay</a></div><div class="ttdeci">@ FlexRay</div><div class="ttdoc">FlexRay bus.</div></div>
<div class="ttc" id="anamespacemdf_html_a7d8062669e05a387de168820f98d4ff6abe2ae05fb04ddcf6efa31e63e0f0e111"><div class="ttname"><a href="namespacemdf.html#a7d8062669e05a387de168820f98d4ff6abe2ae05fb04ddcf6efa31e63e0f0e111">mdf::BusType::Ethernet</a></div><div class="ttdeci">@ Ethernet</div><div class="ttdoc">EtherNet bus.</div></div>
<div class="ttc" id="anamespacemdf_html_a7e87e4f5b259d4a96040c3729bc2d75c"><div class="ttname"><a href="namespacemdf.html#a7e87e4f5b259d4a96040c3729bc2d75c">mdf::MdfStorageType</a></div><div class="ttdeci">MdfStorageType</div><div class="ttdoc">Enumerate that defines how the raw data is stored. By default the fixed length record is stored....</div><div class="ttdef"><b>Definition</b> mdfwriter.h:53</div></div>
<div class="ttc" id="anamespacemdf_html_a7e87e4f5b259d4a96040c3729bc2d75ca147ee54090dbf77df17c23f9202ad0c3"><div class="ttname"><a href="namespacemdf.html#a7e87e4f5b259d4a96040c3729bc2d75ca147ee54090dbf77df17c23f9202ad0c3">mdf::MdfStorageType::VlsdStorage</a></div><div class="ttdeci">@ VlsdStorage</div><div class="ttdoc">Using variable length storage.</div></div>
<div class="ttc" id="anamespacemdf_html_a7e87e4f5b259d4a96040c3729bc2d75ca3ddf6d91674409a2af938290dca6f94c"><div class="ttname"><a href="namespacemdf.html#a7e87e4f5b259d4a96040c3729bc2d75ca3ddf6d91674409a2af938290dca6f94c">mdf::MdfStorageType::FixedLengthStorage</a></div><div class="ttdeci">@ FixedLengthStorage</div><div class="ttdoc">The default is to use fixed length records.</div></div>
<div class="ttc" id="anamespacemdf_html_a7e87e4f5b259d4a96040c3729bc2d75ca8492a9813f972dc0ac344d500f1268f5"><div class="ttname"><a href="namespacemdf.html#a7e87e4f5b259d4a96040c3729bc2d75ca8492a9813f972dc0ac344d500f1268f5">mdf::MdfStorageType::MlsdStorage</a></div><div class="ttdeci">@ MlsdStorage</div><div class="ttdoc">Using maximum length storage.</div></div>
<div class="ttc" id="anamespacemdf_html_ab408474aca4bb3e6fb04416ec3044d40"><div class="ttname"><a href="namespacemdf.html#ab408474aca4bb3e6fb04416ec3044d40">mdf::MdfBusType</a></div><div class="ttdeci">MdfBusType</div><div class="ttdoc">Enumerate that defines type of bus. Only relevant for bus logging.</div><div class="ttdef"><b>Definition</b> mdfwriter.h:29</div></div>
<div class="ttc" id="anamespacemdf_html_ab408474aca4bb3e6fb04416ec3044d40a696b031073e74bf2cb98e5ef201d4aa3"><div class="ttname"><a href="namespacemdf.html#ab408474aca4bb3e6fb04416ec3044d40a696b031073e74bf2cb98e5ef201d4aa3">mdf::MdfBusType::UNKNOWN</a></div><div class="ttdeci">@ UNKNOWN</div><div class="ttdoc">Unknown bus type (Default)</div></div>
<div class="ttc" id="anamespacemdf_html_ab408474aca4bb3e6fb04416ec3044d40a6d5050f7a97e7e2e881a4e09dfbd6087"><div class="ttname"><a href="namespacemdf.html#ab408474aca4bb3e6fb04416ec3044d40a6d5050f7a97e7e2e881a4e09dfbd6087">mdf::MdfBusType::CAN</a></div><div class="ttdeci">@ CAN</div><div class="ttdoc">CAN or CAN-FD bus.</div></div>
<div class="ttc" id="anamespacemdf_html_ab408474aca4bb3e6fb04416ec3044d40a882dd232c0425bb9366544f84f0a7b6c"><div class="ttname"><a href="namespacemdf.html#ab408474aca4bb3e6fb04416ec3044d40a882dd232c0425bb9366544f84f0a7b6c">mdf::MdfBusType::MOST</a></div><div class="ttdeci">@ MOST</div><div class="ttdoc">MOST bus.</div></div>
<div class="ttc" id="anamespacemdf_html_ab408474aca4bb3e6fb04416ec3044d40a90c3fd5ee0c6c471cac39b5f9a4ffae2"><div class="ttname"><a href="namespacemdf.html#ab408474aca4bb3e6fb04416ec3044d40a90c3fd5ee0c6c471cac39b5f9a4ffae2">mdf::MdfBusType::LIN</a></div><div class="ttdeci">@ LIN</div><div class="ttdoc">LIN bus.</div></div>
<div class="ttc" id="asamplerecord_8h_html"><div class="ttname"><a href="samplerecord_8h.html">samplerecord.h</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.12.0
</small></address>
</div><!-- doc-content -->
</body>
</html>
